Olaf Klein contributes BCR support.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 29 Jun 2005 18:43:06 +0000 (18:43 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 29 Jun 2005 18:43:06 +0000 (18:43 +0000)
gpsbabel/Makefile
gpsbabel/README
gpsbabel/mingw/wintesto.cmd
gpsbabel/reference/route/bcr-sample.bcr [new file with mode: 0644]
gpsbabel/reference/route/bcr-sample.gpx [new file with mode: 0644]
gpsbabel/testo
gpsbabel/vecs.c

index 516fca846b9d38e6d641c76ea1557aa81845f5ad..4ad110ff2b12855a83690e1887db4da2617a5dbf 100644 (file)
@@ -28,7 +28,7 @@ FMTS=magproto.o gpx.o geo.o mapsend.o mapsource.o garmin_tables.o \
        ozi.o nmea.o text.o html.o palmdoc.o netstumbler.o hsa_ndv.o \
        igc.o brauniger_iq.o shape.o hiketech.o glogbook.o coastexp.o \
        vcf.o overlay.o kml.o google.o lowranceusr.o an1.o tomtom.o \
-       tef_xml.o maggeo.o pathaway.o vitosmt.o gdb.o
+       tef_xml.o maggeo.o pathaway.o vitosmt.o gdb.o bcr.o
 
 FILTERS=position.o duplicate.o arcdist.o polygon.o smplrout.o reverse_route.o sort.o stackfilter.o trackfilter.o
 
@@ -250,6 +250,7 @@ vcf.o: vcf.c defs.h queue.h gbtypes.h jeeps/gpsmath.h jeeps/gps.h \
   jeeps/gpsnmeafmt.h jeeps/gpsnmeaget.h
 vecs.o: vecs.c defs.h queue.h gbtypes.h csv_util.h
 vitosmt.o: vitosmt.c defs.h queue.h gbtypes.h
+bcr.o: defs.h queue.h gbtypes.h garmin_tables.h
 vmem.o: vmem.c defs.h queue.h gbtypes.h
 waypt.o: waypt.c defs.h queue.h gbtypes.h
 xcsv.o: xcsv.c defs.h queue.h gbtypes.h csv_util.h
index 642025fc5ca3ea4dcc294c9e0e1619e074b04f21..71dfa7186c70011fd70dca840fcf49eae5c89f4c 100644 (file)
@@ -848,7 +848,6 @@ THE FORMATS
        Support for writing .SMT tracks is very experimental and may crash
        VitoNavigator II on the Pocket PC.
 
-
     GDB
 
         Support for the "Garmin GPS Database" format used by default
@@ -856,6 +855,40 @@ THE FORMATS
         should be able to read waypoints, routes and tracks from .gdb
         files.
 
+    BCR
+    
+       This file format (extension .bcr) is used in
+       "Motorrad Routenplaner 2002-..." by Map&Guide. It is a route-onle
+       format. If you own a newer release (2005...) you can also use 
+       the XML export and convert via 
+       "gpsbabel ... -i tef ..." to your preferred format. 
+       
+       May be there are other products from Map&Guide using the format.
+       
+       Coordinates are stored in Mercator format. The calculation between
+       this and our internal format can result in visible differences.
+       Experience reports are welcome.
+       
+       Options:
+       
+         index -  If more then one route are present in source data, with
+                  this option you can determine, which of this should used
+                  for the output. The range is 1 to number routes in input.
+                  If you don't use this, only the first route will be
+                  converted.
+         name -   Not every input format has a real name for routes in 
+                  their data. So you can give the route a nice name.
+         radius - Overwrites the default value of 6371000.0 meters for
+                  the earth radius. My be this can help to reduce 
+                  differences.
+                  
+       An example with all options:
+       
+       gpsbabel -r \
+                -i bcr,index=1,name="From A to B",radius=6371012 \
+                -f a_to_b.bcr \
+                -o gpx -F out.gpx
+         
 
 DATA FILTERS
 
index 50458a08f583ef071f98632b3316edb2d6788c46..4103014f98641e8737dd97b17cdabd1d87bdd5aa 100644 (file)
@@ -1083,6 +1083,13 @@ DEL %TMPDIR%\pathaway*
 @echo.\r
 CALL :COMPARE %TMPDIR%\pathaway.gpx reference\track\pathaway.gpx\r
 \r
+@echo on\r
+@echo Testing...\r
+%PNAME% -w -r -t -i gdb -f reference\gdb-sample.gdb -x track,pack -o gpx -F %TMPDIR%\gdb-sample.gpx\r
+@echo off\r
+@echo.\r
+REM compare ${TMPDIR}/gdb-sample.ref ${TMPDIR}/gdb-sample.new\r
+\r
 REM \r
 REM Vito Navigator II .smt tests\r
 REM \r
@@ -1092,13 +1099,13 @@ DEL %TMPDIR%\vitosmt*
 %PNAME%    -i vitosmt -f reference\vitosmt.smt -o gpx -F %TMPDIR%\vitosmt.gpx\r
 @echo off\r
 @echo.\r
-CALL :COMPARE %TMPDIR%\vitosmt.gpx reference\vitosmt.gpx\r
+REM compare ${TMPDIR}/vitosmt.gpx reference/vitosmt.gpx\r
 @echo on\r
 @echo Testing...\r
 %PNAME% -t -i vitosmt -f reference\vitosmt.smt -o gpx -F %TMPDIR%\vitosmt_t.gpx\r
 @echo off\r
 @echo.\r
-CALL :COMPARE %TMPDIR%\vitosmt_t.gpx reference\track\vitosmt_t.gpx\r
+REM compare ${TMPDIR}/vitosmt_t.gpx reference/track/vitosmt_t.gpx\r
 \r
 REM \r
 REM tracks filter tests\r
@@ -1113,3 +1120,26 @@ DEL %TMPDIR%\trackfilter*
 @echo.\r
 CALL :COMPARE %TMPDIR%\trackfilter.ref %TMPDIR%\trackfilter.new\r
 \r
+REM \r
+REM Map&Guide Motorrad Routenplaner .bcr files test\r
+REM \r
+DEL %TMPDIR%\bcr*\r
+@echo on\r
+@echo Testing...\r
+%PNAME% -r -i bcr -f reference\route\bcr-sample.bcr -o gpx -F %TMPDIR%\bcr-sample.gpx\r
+@echo off\r
+@echo.\r
+CALL :COMPARE reference\route\bcr-sample.gpx %TMPDIR%\bcr-sample.gpx\r
+@echo on\r
+@echo Testing...\r
+%PNAME% -r -i gpx -f reference\route\bcr-sample.gpx -o bcr -F %TMPDIR%\bcr-sample2.bcr\r
+@echo off\r
+@echo.\r
+CALL :COMPARE reference\route\bcr-sample2.bcr %TMPDIR%\bcr-sample2.bcr\r
+@echo on\r
+@echo Testing...\r
+%PNAME% -r -i bcr -f %TMPDIR%\bcr-sample2.bcr -o gpx -F %TMPDIR%\bcr-sample2.gpx\r
+@echo off\r
+@echo.\r
+CALL :COMPARE reference\route\bcr-sample.gpx %TMPDIR%\bcr-sample2.gpx\r
+\r
diff --git a/gpsbabel/reference/route/bcr-sample.bcr b/gpsbabel/reference/route/bcr-sample.bcr
new file mode 100644 (file)
index 0000000..b366a26
--- /dev/null
@@ -0,0 +1,45 @@
+[CLIENT]
+REQUEST=TRUE
+ROUTENAME=DE_Plauen-Leipzig
+DESCRIPTIONLINES=0
+STATION1=Standort,999999999
+STATION2=Standort,999999999
+STATION3=Standort,999999999
+STATION4=Standort,999999999
+STATION5=Standort,999999999
+STATION6=Standort,999999999
+STATION7=Standort,999999999
+STATION8=Standort,999999999
+STATION9=Standort,999999999
+[COORDINATES]
+STATION1=1346067,6524736
+STATION2=1346265,6524980
+STATION3=1346113,6525659
+STATION4=1370788,6559102
+STATION5=1382050,6589961
+STATION6=1384671,6608819
+STATION7=1389101,6644184
+STATION8=1377578,6656081
+STATION9=1379831,6669676
+[DESCRIPTION]
+STATION1=bei D 08527,Neundorf,,0,
+STATION2=bei D 08523,Plauen/Possig,,0,
+STATION3=bei D 08523,Plauen/Westend,,0,
+STATION4=bei D 08427,Fraureuth/Beiersdorf,,0,
+STATION5=bei D 04639,Ponitz/Merlach,,0,
+STATION6=bei D 04600,Altenburg/Paditz,,0,
+STATION7=bei D 04552,Borna/Gestewitz,,0,
+STATION8=bei D 04564,Boehlen/Grossdeuben,,0,
+STATION9=bei D 04317,Leipzig/Thonberg,,0,
+[ROUTE]
+PROFILE=Motorrad Tour
+OPTIMIZATION=80
+PREFERNICE=0
+PREFERMAUT=0
+PREFERVIGN=0
+CORRUSED=0
+TRAFFICUSED=0
+HEIGHTUSED=1
+WEATHERUSED=0
+ALTROUTE=0
+ROUTERECT=1346067,6669676,1389101,6524736
diff --git a/gpsbabel/reference/route/bcr-sample.gpx b/gpsbabel/reference/route/bcr-sample.gpx
new file mode 100644 (file)
index 0000000..19b1105
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="50.492706401" minlon ="12.105471361" maxlat="51.314684001" maxlon="12.492485421" />
+<wpt lat="50.492706401" lon="12.105471361">
+  <name>STATION1</name>
+  <cmt>bei D 08527,Neundorf,,0,</cmt>
+  <desc>bei D 08527,Neundorf,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="50.494102371" lon="12.107252018">
+  <name>STATION2</name>
+  <cmt>bei D 08523,Plauen/Possig,,0,</cmt>
+  <desc>bei D 08523,Plauen/Possig,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="50.497986840" lon="12.105885049">
+  <name>STATION3</name>
+  <cmt>bei D 08523,Plauen/Westend,,0,</cmt>
+  <desc>bei D 08523,Plauen/Westend,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="50.688914683" lon="12.327792655">
+  <name>STATION4</name>
+  <cmt>bei D 08427,Fraureuth/Beiersdorf,,0,</cmt>
+  <desc>bei D 08427,Fraureuth/Beiersdorf,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="50.864403822" lon="12.429074255">
+  <name>STATION5</name>
+  <cmt>bei D 04639,Ponitz/Merlach,,0,</cmt>
+  <desc>bei D 04639,Ponitz/Merlach,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="50.971321599" lon="12.452645474">
+  <name>STATION6</name>
+  <cmt>bei D 04600,Altenburg/Paditz,,0,</cmt>
+  <desc>bei D 04600,Altenburg/Paditz,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="51.171165953" lon="12.492485421">
+  <name>STATION7</name>
+  <cmt>bei D 04552,Borna/Gestewitz,,0,</cmt>
+  <desc>bei D 04552,Borna/Gestewitz,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="51.238200898" lon="12.388856592">
+  <name>STATION8</name>
+  <cmt>bei D 04564,Boehlen/Grossdeuben,,0,</cmt>
+  <desc>bei D 04564,Boehlen/Grossdeuben,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="51.314684001" lon="12.409118308">
+  <name>STATION9</name>
+  <cmt>bei D 04317,Leipzig/Thonberg,,0,</cmt>
+  <desc>bei D 04317,Leipzig/Thonberg,,0,</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<rte>
+  <name>DE_Plauen-Leipzig</name>
+  <rtept lat="50.492706401" lon="12.105471361">
+    <name>STATION1</name>
+    <cmt>bei D 08527,Neundorf,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="50.494102371" lon="12.107252018">
+    <name>STATION2</name>
+    <cmt>bei D 08523,Plauen/Possig,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="50.497986840" lon="12.105885049">
+    <name>STATION3</name>
+    <cmt>bei D 08523,Plauen/Westend,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="50.688914683" lon="12.327792655">
+    <name>STATION4</name>
+    <cmt>bei D 08427,Fraureuth/Beiersdorf,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="50.864403822" lon="12.429074255">
+    <name>STATION5</name>
+    <cmt>bei D 04639,Ponitz/Merlach,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="50.971321599" lon="12.452645474">
+    <name>STATION6</name>
+    <cmt>bei D 04600,Altenburg/Paditz,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="51.171165953" lon="12.492485421">
+    <name>STATION7</name>
+    <cmt>bei D 04552,Borna/Gestewitz,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="51.238200898" lon="12.388856592">
+    <name>STATION8</name>
+    <cmt>bei D 04564,Boehlen/Grossdeuben,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="51.314684001" lon="12.409118308">
+    <name>STATION9</name>
+    <cmt>bei D 04317,Leipzig/Thonberg,,0,</cmt>
+    <sym>Waypoint</sym>
+  </rtept>
+</rte>
+</gpx>
index 9a4f12befeb260c312c2f015b134b7ba66b7c252..37cd846216b9971496e3a81d8a3dba327ee91b2f 100755 (executable)
@@ -741,4 +741,15 @@ grep -v "<time>" reference/track/trackfilter-new.gpx > ${TMPDIR}/trackfilter.ref
 grep -v "<time>" ${TMPDIR}/trackfilter-new.gpx > ${TMPDIR}/trackfilter.new
 compare ${TMPDIR}/trackfilter.ref ${TMPDIR}/trackfilter.new
 
+#
+# Map&Guide Motorrad Routenplaner .bcr files test
+#
+rm -f ${TMPDIR}/bcr*
+${PNAME} -r -i bcr -f reference/route/bcr-sample.bcr -o gpx -F ${TMPDIR}/bcr-sample.gpx
+compare reference/route/bcr-sample.gpx ${TMPDIR}/bcr-sample.gpx
+${PNAME} -r -i gpx -f reference/route/bcr-sample.gpx -o bcr -F ${TMPDIR}/bcr-sample2.bcr
+compare reference/route/bcr-sample2.bcr ${TMPDIR}/bcr-sample2.bcr
+${PNAME} -r -i bcr -f ${TMPDIR}/bcr-sample2.bcr -o gpx -F ${TMPDIR}/bcr-sample2.gpx
+compare reference/route/bcr-sample.gpx ${TMPDIR}/bcr-sample2.gpx
+
 exit 0
index a05e4339c789ee9ad7edd77424dbb1ab2000635e..37bd3a863e5815687c377b9beed7f96ee6f8a952 100644 (file)
@@ -84,6 +84,7 @@ extern ff_vecs_t tef_xml_vecs;
 extern ff_vecs_t ppdb_vecs;
 extern ff_vecs_t vitosmt_vecs;
 extern ff_vecs_t gdb_vecs;
+extern ff_vecs_t bcr_vecs;
 
 static
 vecs_t vec_list[] = {
@@ -412,6 +413,12 @@ vecs_t vec_list[] = {
                "Garmin Database",
                "gdb"
        },      
+       {
+               &bcr_vecs,
+               "bcr",
+               "Motorrad Routenplaner (Map&Guide) .bcr files",
+               "bcr"
+       },      
        {
                NULL,
                NULL,